public class Main {
    public static void main(String[] args) {
        java.util.Set<String> skipping = new java.util.HashSet<>();

        //参加跳绳的学生uiuykkjg
        skipping.add("一");
        skipping.add("二");
        skipping.add("三");
        skipping.add("四");

        //参加跑步的学生
        java.util.Set<String> running = new java.util.HashSet<>();
        running.add("一");
        running.add("三");
        running.add("六");

        //参加运动项目的所有学生
        java.util.Set<String> all = new java.util.HashSet<>();

        all.addAll(skipping);
        all.addAll(running);
        System.out.println("All students participating in sports:"+all);

        //输出参加了两项的同学。
        java.util.Set<String> SkippingRunning = new java.util.HashSet<>();
        SkippingRunning.addAll(running);
        SkippingRunning.retainAll(skipping);
        System.out.println("Output the students who participated in two items:"+SkippingRunning);

        //输出只参加跳绳没参加跑步的同学
        all.removeAll(running);
        System.out.println("Those who jump rope but not run"+all);

    }
}